/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package acscoreserver.data;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author rjsantos
 */
@Entity
@Table(name = "gamefrag")
@NamedQueries({@NamedQuery(name = "Gamefrag.findAll", query = "SELECT g FROM Gamefrag g"), @NamedQuery(name = "Gamefrag.findById", query = "SELECT g FROM Gamefrag g WHERE g.id = :id"), @NamedQuery(name = "Gamefrag.findByTimestamp", query = "SELECT g FROM Gamefrag g WHERE g.timestamp = :timestamp"), @NamedQuery(name = "Gamefrag.findByIdGame", query = "SELECT g FROM Gamefrag g WHERE g.idGame = :idGame"), @NamedQuery(name = "Gamefrag.findByFragger", query = "SELECT g FROM Gamefrag g WHERE g.fragger = :fragger"), @NamedQuery(name = "Gamefrag.findByFragged", query = "SELECT g FROM Gamefrag g WHERE g.fragged = :fragged")})
public class Gamefrag implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "timestamp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date timestamp;
    @Column(name = "id_game")
    private Integer idGame;
    @Column(name = "fragger")
    private String fragger;
    @Column(name = "fragged")
    private String fragged;

    public Gamefrag() {
    }

    public Gamefrag(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public Integer getIdGame() {
        return idGame;
    }

    public void setIdGame(Integer idGame) {
        this.idGame = idGame;
    }

    public String getFragger() {
        return fragger;
    }

    public void setFragger(String fragger) {
        this.fragger = fragger;
    }

    public String getFragged() {
        return fragged;
    }

    public void setFragged(String fragged) {
        this.fragged = fragged;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Gamefrag)) {
            return false;
        }
        Gamefrag other = (Gamefrag) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "acscoreserver.data.Gamefrag[id=" + id + "]";
    }

}
